Skip to content

Java: Document @cds.java.ignore#2097

Merged
agoerler merged 9 commits intomainfrom
java-document-ignore
Jan 16, 2026
Merged

Java: Document @cds.java.ignore#2097
agoerler merged 9 commits intomainfrom
java-document-ignore

Conversation

@vmikhailenko
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread java/cds-data.md
This annotation propagates across projections and they also omit the ignored elements. This can be overridden with the following annotation:

```cds
annotate Books:ignored with @cds.java.ignore: false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm probably lacking modelling knowledge to understand this. How do I set the context where this should be used, for example a service? I guess it's not globally overridden, or?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I understand the question.

Copy link
Copy Markdown
Contributor

@renejeglinsky renejeglinsky Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this annotate statement usually located?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside the service where annotation is overridden.

Comment thread java/cds-data.md Outdated
Comment thread java/cds-data.md Outdated
smahati and others added 3 commits September 22, 2025 10:46
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
@vmikhailenko
Copy link
Copy Markdown
Contributor Author

@renejeglinsky Can we merge this?

Comment thread java/cds-data.md
}
```

This annotation propagates across projections and they also omit the ignored elements. This can be overridden with the following annotation:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This annotation propagates across projections and they also omit the ignored elements. This can be overridden with the following annotation:
This annotation propagates across projections and they also omit the ignored elements. This can be overridden (in a test, for example) with the following annotation:

Trying to provide an example use case, can ignore it and merge the PR if you'd like. @vmikhailenko

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overriding ignore is very exotic. I can remove whole clause about override to avoid confusion.

@agoerler agoerler merged commit 394acb2 into main Jan 16, 2026
7 checks passed
@agoerler agoerler deleted the java-document-ignore branch January 16, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants